package com.zdyg.inputtask.project.controller;


import com.zdyg.inputtask.project.service.ISysUserService;
import com.zdyg.inputtask.project.vo.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author ANGE
 * @since 2019-12-11
 */
@Controller
@RequestMapping("/sysUser")
public class SysUserController {
    @Autowired
    private ISysUserService sysUserService;


    @ResponseBody
    @RequestMapping("login")
    public ResultJson login(String phone){
        ResultJson resultJson = new ResultJson();
        System.out.println(phone);
        if(!sysUserService.loginUser(phone)){
            resultJson.setFlag(false);
            resultJson.setMsg("账号不存在!");
        }
            return resultJson;
    }
}

